ga.view.config
Class GASettings

java.lang.Object
  extended by ga.view.config.AbstractSettings
      extended by ga.view.config.GASettings

public class GASettings
extends AbstractSettings

This settings implementation parses and holds the settings for a GA.

Since:
12.08.2012
Author:
Stephan Dreyer

Field Summary
private  org.jdom.Element element
           
static java.lang.String EVALUATOR
           
private  boolean hasRun
           
private static java.util.logging.Logger LOGGER
           
static java.lang.String POST_EVALUATION_STATE
           
static java.lang.String PRE_EVALUATION_STATE
           
 
Constructor Summary
GASettings(org.jdom.Element element)
          Instantiates new GA settings.
 
Method Summary
 boolean hasRun()
          Checks if this has run before.
 void parse(org.jdom.Element element)
          Parses the settings from an xml element.
private  java.lang.Object parseObject(org.jdom.Element cValue)
          Parses an object from xml and stores it with the id.
private  java.lang.Object parseObject(org.jdom.Element cValue, java.lang.String id)
          Parses an object from xml and stores it with the given id.
private  void parseSimple(org.jdom.Element sValue)
          Parses a simple parameter from an element that contains a ground datatype (boolean, string, int, long, float, double).
 void reset()
          Resets these settings by clearing all settings and reparsing the element.
 void setHasRun(boolean hasRun)
          Sets the hasRun flag.
 
Methods inherited from class ga.view.config.AbstractSettings
clear, createObject, createObject, createSimple, get, get, getBoolean, getConstructor, getFloat, getInt, getString, put, putUnique, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PRE_EVALUATION_STATE

public static final java.lang.String PRE_EVALUATION_STATE
See Also:
Constant Field Values

POST_EVALUATION_STATE

public static final java.lang.String POST_EVALUATION_STATE
See Also:
Constant Field Values

EVALUATOR

public static final java.lang.String EVALUATOR
See Also:
Constant Field Values

LOGGER

private static final java.util.logging.Logger LOGGER

element

private org.jdom.Element element

hasRun

private boolean hasRun
Constructor Detail

GASettings

public GASettings(org.jdom.Element element)
Instantiates new GA settings.

Parameters:
element - the element
Since:
12.08.2012
Method Detail

setHasRun

public void setHasRun(boolean hasRun)
Sets the hasRun flag.

Parameters:
hasRun - the new hasRun flag.
Since:
12.08.2012

hasRun

public boolean hasRun()
Checks if this has run before.

Returns:
true, if successful
Since:
12.08.2012

reset

public void reset()
Resets these settings by clearing all settings and reparsing the element.

Since:
12.08.2012

parse

public void parse(org.jdom.Element element)
Parses the settings from an xml element.

Parameters:
element - the element
Since:
12.08.2012

parseSimple

private void parseSimple(org.jdom.Element sValue)
Parses a simple parameter from an element that contains a ground datatype (boolean, string, int, long, float, double).

Parameters:
sValue - the Element
Since:
12.08.2012

parseObject

private java.lang.Object parseObject(org.jdom.Element cValue)
Parses an object from xml and stores it with the id.

Parameters:
cValue - the Element
Returns:
the object
Since:
12.08.2012

parseObject

private java.lang.Object parseObject(org.jdom.Element cValue,
                                     java.lang.String id)
Parses an object from xml and stores it with the given id.

Parameters:
cValue - the Element
id - The id to store it.
Returns:
the object
Since:
12.08.2012